-include $(CONFIG)
# 模块名
obj-m := demo_drv.o
# 模块依赖的文件列表
demo_drv-objs := demo.o dm_mamanger.o

# 默认的值
ARCH ?= arm
KERNELDIR ?= /path/linux-v4.14-2018.3
CROSS_COMPILE ?= arm-linux-

PWD := $(shell pwd)

default:
	$(MAKE)  ARCH=$(ARCH) CROSS_COMPILE=${KERNEL_CROSS} -C $(KERNELDIR) M=$(PWD) modules
clean:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) clean

show:
	echo "ARCH     :    ${ARCH}"
	echo "CC       :    ${KERNEL_CROSS}"
	echo "KDIR     :    ${KERNELDIR}"
